-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[zh-cn]: update the translation of Location hash
property
#24798
base: main
Are you sure you want to change the base?
Conversation
Preview URLs (comment last updated: 2025-01-08 01:15:18) |
<a id="myAnchor" href="/zh-CN/docs/Location.href#示例">示例</a> | ||
<script> | ||
var anchor = document.getElementById("myAnchor"); | ||
console.log(anchor.hash); // 返回'#Examples' | ||
const anchor = document.getElementById("myAnchor"); | ||
console.log(anchor.hash); // '#示例' | ||
</script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the example here appropriate?
The
Location
interface is accessible via Document.location and Window.location respectively.
--- from TheLocation
interface
I don't think we should use an <a>
element here, as <a>
element is the implemetation of HTMLAnchorElement
interface (not the Location
interface).
Another issue on the content of this example. The hash
property would be percent-encoded (see the test I made below), so the description above is also wrong 😢
It seems that only non-ascii characters will be encoded (details: mdn/content#37003)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我先去修改上游
This pull request has merge conflicts that must be resolved before it can be merged. |
上游的错误还未修复,我先转草稿了 |
@yin1999 可以了,上游已经更新了,请帮我审查 |
没有,我上面提到的问题其实还未解决,现在只是在示例层面隐藏了这个问题。我希望能够优先解决 |
Description
Related issues and pull requests